public class Test {
    public static void main(String[] args) {
        MyArraylist myArraylist=new MyArraylist();
        myArraylist.add(1);
        myArraylist.add(2);
        myArraylist.add(3);
        myArraylist.add(4);
        myArraylist.add(5);
        try {
            myArraylist.add(1,10);
        }catch (PosWrongfulException e) {
            e.printStackTrace();
        }
        int flag= myArraylist.indexOf(99);
        if(flag>0){
            System.out.println("它的位置是："+flag);
        }else{
            System.out.println("未找到此数");
        }
        try {
            System.out.println(myArraylist.get(1));
        }catch (PosWrongfulException e) {
            e.printStackTrace();
        }
        try{
            myArraylist.set(2,99);
        }catch (PosWrongfulException e){
            e.printStackTrace();
        }
        myArraylist.remove(100);
        System.out.println("元素个数为："+myArraylist.size());
        myArraylist.display();
        //myArraylist.clear();
    }
}
